package com.seecen.utils.exception;

import com.seecen.utils.ResultCode;

/**
 * @program: p2-end
 * @description:
 * @author: lxk
 * @create: 2025-10-21 16:31
 * @version: 1.0
 **/
public class BusinessException extends RuntimeException{
    private Integer code;

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.code = resultCode.getCode();
    }

    // getters
    public Integer getCode() {
        return code;
    }
}
